/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved.
 */

package org.opengauss.driver;

import java.util.Properties;

/**
 * description:this for MysqlDriverInfo Class
 * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021.
 *
 * @author Administrator
 * @version [openGauss_debug 0.0.1 2021/4/23]
 * @since 2021/4/23
 */
public class MysqlDriverInfo extends AbstraceDriverInfo {
    public static final String DEFAULT_CONNECT_FORMAT = "jdbc:mysql://%s/%s";
    public MysqlDriverInfo(Properties jdbcProp, Properties urlProp) {
        super(jdbcProp, urlProp);
    }

    @Override
    public String getDriver() {
        return "com.mysql.jdbc.Driver";
    }

    @Override
    protected String getDriverPrefix() {
        return String.format(DEFAULT_CONNECT_FORMAT, getHosts(), getDatabase());
    }
}
